package com.csp.dp.sfp;

/**
 * @author Strive
 * @date 2024/3/4 19:58
 */
public class CourseFactory {

    public Course getCourse(String name) {

        if ("java".equals(name)) {
            return new JavaCourse();
        } else if ("python".equals(name)) {
            return new PythonCourse();
        }

        return null;
    }
}
